using System;
using System.Collections.Generic;
using System.Reflection;

namespace NetMigration.Utilities
{
    public static class MigrationTypeHelper
    {
        public static List<Type> AllMigrationTypes(this Assembly assembly)
        {
            var typeList = new List<Type>();
            typeList.AddRange(assembly.GetTypes());
            return typeList.FindAll(t => t.BaseType.Name == "Migration" && t.IsPublic);
        }
    }
}